// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import echarts from 'echarts'

Vue.config.productionTip = false
Vue.use(echarts);
Vue.prototype.$echarts = echarts


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})

axios({
  url: 'http://123.207.32.32:8000/home/multidata',
  // 针对GET请求的参数
  params: {

  }
}).then(res => {
  console.log(res)
})

// axios 发送并发请求
axios.all([
  axios({
    url:"http://123.207.32.32:8000/home/data",
    params: {
      type: "sell",
      page: 5
    }
  }),
  axios({
    url:"http://123.207.32.32:8000/home/multidata"
  })
]).then(axios.spread((res1, res2) => {// 返回结果顺序与请求的顺序相同
  console.log(res1);
  console.log(res2)
}))